package edu.je.history.controller;

import com.junqson.je.common.UserHolder;
import com.junqson.je.common.annotation.LoginRequire;
import com.junqson.je.common.model.ApiResult;
import com.junqson.je.common.model.User;
import com.netflix.discovery.converters.Auto;
import edu.je.history.Service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @author: Anhlaidh
 * @date: 2021-04-21 16:09
 */
@RestController
public class HistoryController {
    @Autowired
    HistoryService historyService;

    @LoginRequire
    @RequestMapping( "browse/put/history")
    public ApiResult PutBrowseHistory(@RequestParam("id") int companyId) {
        return historyService.PutBrowseHistory(companyId);
    }
    @LoginRequire
    @RequestMapping( "browse/get/history")
    public ApiResult GetBrowseHistory() {
        return historyService.GetBrowseHistory();
    }
    @LoginRequire
    @RequestMapping( "browse/delete/history")
    public ApiResult DelBrowseHistory(@RequestParam("id") int companyId) {
        return historyService.DelBrowseHistory(companyId);
    }
}
